//用于编辑测试计划详细信息的表单
var testDesignDetailForm = Ext.create("Ext.form.Panel", {
    header:false,
    bodyPadding: 10,
    border:false,
    defaults: {
        anchor: '100%',
        layout: 'column', //默认定义组件内部元素为布局为列布局方式
        border: false,
        margin:'20 0 0 0',
    },
    items: [{
    	margin:'0 0 0 0',
        defaults: {
            border: false,
            layout: 'form',
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'textfield',
                labelWidth: 50,
                allowBlank: false,
                maxLength: fieldWordLimited,
                fieldLabel: '标题',
                name: 'title',
                emptyText: '限制字数' + fieldWordLimited,
                itemId: 'testDesignDetailFormTitle'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                labelWidth: 30,
                fieldLabel: '状态',
                itemId: 'testDesignDetailFormState'
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                labelWidth: 50,
                fieldLabel: '编写者',
                itemId: 'testDesignDetailFormAuthor'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'combo',
                fieldLabel: '优先级',
                allowBlank: false,
                labelWidth: 50,
                editable: false,//防止用户直接在下拉框里输入
                itemId: 'testDesignDetailFormPriority',
                emptyText: '选择计划优先级',
                store: priorityStore,
                queryMode: 'local',
                displayField: 'priorityName',
                valueField: 'priorityNum',
            }]
        }]
    }, {
        defaults: {
            border: false,
            layout: 'form',
        },
        items: [{
            columnWidth: .5, //该列占用的宽度，标识为50％
            items: [{
                xtype: 'displayfield',
                fieldLabel: '创建时间:',
                labelWidth: 70,
                itemId: 'testDesignDetailFormCreateDate'
            }]
        }, {
            columnWidth: .5,
            items: [{
                xtype: 'displayfield',
                fieldLabel: '最近更新:',
                labelWidth: 70,
                itemId: 'testDesignDetailFormUpdateDate'
            }]
        }]
    }, {
    	fieldLabel: '描述信息',
    	allowBlank: false,
    	labelWidth: 70,
        xtype: 'textareafield',
        height:'65%',
        id: 'testDesignDetailFormDescription',
        cls: 'x-form-valid',
        emptyText: '填写描述信息'
    }]
});

//用于测试计划转换成测试执行时提供测试集、优先级选择的表单
var testDesignTransformToRunForm=Ext.create("Ext.form.Panel", {
	border:false,
    title: false,
    bodyPadding: '10 20',
    defaults: {
        anchor: '98%',
        msgTarget: 'side',
        allowBlank: false
    },
    items: [
        chooserRunTestLabTreePicker,{
            xtype: 'combo',
            fieldLabel: '优先级',
            allowBlank: false,
            labelWidth: 50,
            editable: false,//防止用户直接在下拉框里输入
            itemId: 'testDesignToRunPriority',
            emptyText: '选择计划优先级',
            store: priorityStore,
            queryMode: 'local',
            displayField: 'priorityName',
            valueField: 'priorityNum',
        },{
            xtype: 'textfield',
            labelWidth: 50,
            allowBlank: false,
            fieldLabel: '名称',
            emptyText: '请输入名称',
            itemId: 'testDesignToRunTitle'
        }]
});